/*
 * main.h
 *
 *  Created on: 02.04.2014
 *      Author: alexs
 */

#ifndef MAIN_H_
#define MAIN_H_
#define DEBUG
//#define CLEAR_ALL

#include <avr/io.h>
#include <stdint.h>

typedef union {
	struct {
		uint16_t cnt;
		uint8_t sn[7];
		uint8_t crc;
	};
	uint8_t buff[10];
} ultralight_t;

typedef union {
	struct {
		uint16_t cnt1;
		uint16_t cnt2;
	};
	uint8_t buff[4];
} ultralight_page01_t;

#define USARTBAUD 38400L
#define EE_TOP (((uint16_t)(0x1fff/10))*10)
#define TAG_LEN 10
#define COUNT_PAGE 0x08

#endif /* MAIN_H_ */
